# # 1.python如何实现serveragent连接
# import telnetlib
# tn=telnetlib.Telnet()
# tn.open("192.168.13.35",4444)
# tn.write('test'.encode('ascii')+b'\n')
# print(tn.read_very_eager().decode('ascii'))
# # 2.装饰器实现响应时间获取
# import time,requests
# from threading import Thread
# def get_time(func):
# 	def inner():
# 		start=time.time()
# 		f=func()
# 		end=time.time()
# 		return round(end-start),f
# 	return inner
#3.如何实现多线程调用接口并实现持续运行（死循环）
# @get_time
# def login():
# 	data={'username':'admin','password':'admin123','verifycode':'0000'}
# 	r=requests.post('http://localhost:8080/woniusales/user/login',data)
# 	if r.text=='login-pass':
# 		return 'pass'
# 	else:
# 		return 'fail'
# def loop(loopnum):
# 	time_list = []
# 	for i in range(loopnum):
# 		r = login()
# 		print(r)
# 		time_list.append(r[0])
# 	return sum(time_list)/len(time_list),max(time_list),min(time_list)
# def thread(num):
# 	t=Thread(target=loop,args=(num,),daemon=True)
# 	t.start()
# 4.如何收集事务的所有线程的响应时间，并求出平均响应时间和最大、最小响应时间

# 5.如何绘制折线图x=[1,2,3] y=[3,1,8]
import matplotlib.pyplot as plt
x=[1,2,3]
y=[3,1,8]
plt.figure()
plt.plot(x,y)
plt.show()



if __name__ == '__main__':
	# print(loop(100))
	pass




# import re
# s='<li>a1<li><li>b123<li><li>a12<li><li>a<li>'
# r=re.findall('<li>(a\d+?)<li>',s)
# print(r)